Image pattern recognition refers to the study of automated systems and processes designed to recognize patterns in image data. Pattern recognition detectors are useful for a variety of applications, including automated inspection of objects and controlling the operation of machines.
One important application of pattern recognition is in imaging devices to detect documents or images of a particular type and controlling the operation of the imaging device based on detection of a particular pattern. Preferably, a pattern recognition detector in these applications must be efficient and use minimal memory so as to not interfere with the normal flow of image processing in the imaging device.
The invention provides methods and related software for recognizing image patterns in images. These methods are particularly adapted for efficiently detecting object patterns in image data streams received from an image scanner or sent to a printer from an application program in a personal computing system. These detector methods are also adapted for implementation in software drivers for printers and scanners. The detector is used to detect an image pattern associated with a particular type of document, such as a secure document including identification documents and bank notes. For these types of documents, the detector may be used to inhibit scanning or printing of the document, and/or trigger other usage control operations. The detector operates effectively on low resolution images, and minimizes the use of memory by temporally storing and operating on only small groups of scan line bands at a time. This enables the detector to operate on a stream of image data being sent to printer or intercepted from a scanner as the image is being printed or scanned. As such, the detector does not add significant processing complexity or memory requirements to the printing or scanning process. Also, by acting on an image stream during image capture or printing, actions taken in response to detecting a target object pattern can be taken before printing or scanning of an entire document is complete. In addition, the detector can be implemented as part of an operating system, device driver or other program, and can be used to scan digital image files, e.g., when a file is opened. While the methods are adapted for device control within printing and scanning environments, they may be used for other applications as well.
One aspect of the invention is a method for image pattern recognition for detecting an object in an image stream. This method temporarily stores a group of scan lines in the image stream. It transforms image pixels in the scan lines to a low resolution range and color space. It detects boundaries of size relevant candidate shapes in the transformed pixels. It then analyzes the candidate shapes to determine whether the candidate shapes satisfy predetermined criteria associated with a target object being sought. It controls the use of the image stream based on a result of analyzing the candidate shapes.
Another aspect of the invention is a method for image pattern recognition for detecting an object in an image. This method detects a candidate size relevant shape in the image, and performs edge tracing of the candidate size relevant shape to determine whether the candidate satisfies pre-determined shape criteria. The edge tracing includes performing a water spreading method to trace a boundary of the candidate size relevant shape. This water spreading may include water filling or water draining to trace the boundary of the object.
Another aspect of the invention is a method for image pattern recognition for detecting an object in an image. This method detects a size relevant candidate shape in the image. The process of detecting the candidate shape includes scanning pixels along scan lines of the image to detect transitions in pixel values that satisfy predetermined criteria associated with the candidate size relevant shape, and repeating the scanning for consecutive scan lines to detect an estimate of a boundary of a candidate size relevant shape. The detecting further includes performing an initial detection of one or more size relevant candidate shapes in a sub-group of scan lines of a group of scan-lines and performing subsequent detection of the size relevant candidate shape in the group when the initial detection finds at least one size relevant candidate shape in the sub-group. The height of the sub-group of scan lines is less the height of a candidate shape being detected. The method only stores one of the groups of scan lines at a time to minimize memory used to detect the object. Finally, the method analyzes the candidate shape to determine whether the candidate shape satisfies predetermined criteria associated with a target object being sought.
Further features of the invention will become apparent with reference to the following detailed description and accompanying drawing.